/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package pathfinder;

/**
 *
 * @author Administrator
 */
public class Tile {
    
    private boolean isTraversable;
    private int rowsInBoard;
    private int columnsInBoard;
    private byte[][] directionToDest;
    
    public Tile(boolean b, int rows, int columns)
    {
        rowsInBoard = rows;
        columnsInBoard = columns;
        isTraversable = b;
        directionToDest = new byte[rowsInBoard][columnsInBoard];
    }
    
    public byte getDirectionForDestination(int x, int y)
    {
        return directionToDest[x][y];
    }
    
    public void setDestinations(byte[][] directions)
    {
        for(int y = 0; y < directions.length; y++)
        {
            for(int x = 0; x < directions[0].length; x++)
            {
                directionToDest[x][y] = directions[x][y];
            }
        }
        //directionToDest = directions;
    }
    
    public boolean isTraversable()
    {
        return isTraversable;
    }
    
    public void outputDirectionArray()
    {
        for(int y = 0; y < directionToDest.length; y++)
        {
            System.out.println();
            for(int x = 0; x < directionToDest[0].length; x++)
            {
                System.out.print(directionToDest[x][y]);
            }
        }
    }

}
